﻿using System.Collections.Generic;

namespace SessionByActionFilter.DAL {

  public static class DataAccessLayer {

    public static IEnumerable<Eg.Core.Book> GetBooks() {
      var session = MvcApplication.SessionFactory.GetCurrentSession();
      var books = session.QueryOver<Eg.Core.Book>().List();
      return books;
    }

  }
}